From: Tamas K Lengyel Date: Fri, 26 Sep 2014 13:51:57 +0000 (+0200) Subject: relocate struct npfec definition into common X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4317 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=0d813683fa99e8594cfcb5dedadd866493b1adfd;p=xen.git relocate struct npfec definition into common Nested page fault exception code definitions can be reused on ARM as well. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich Acked-by: Tim Deegan --- diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index c09e16bed7..0d94c48cd8 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include /* Interrupt acknowledgement sources. */ enum hvm_intsrc { diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index aae63eecf2..dca298fb64 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -549,27 +549,6 @@ void audit_domains(void); #endif -/* - * Extra fault info types which are used to further describe - * the source of an access violation. - */ -typedef enum { - npfec_kind_unknown, /* must be first */ - npfec_kind_in_gpt, /* violation in guest page table */ - npfec_kind_with_gla /* violation with guest linear address */ -} npfec_kind_t; - -/* - * Nested page fault exception codes. - */ -struct npfec { - unsigned int read_access:1; - unsigned int write_access:1; - unsigned int insn_fetch:1; - unsigned int gla_valid:1; - unsigned int kind:2; /* npfec_kind_t */ -}; - int new_guest_cr3(unsigned long pfn); void make_cr3(struct vcpu *v, unsigned long mfn); void update_cr3(struct vcpu *v); diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 7c0efc7ae1..74a65a61f5 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -88,6 +88,27 @@ int assign_pages( /* Dump info to serial console */ void arch_dump_shared_mem_info(void); +/* + * Extra fault info types which are used to further describe + * the source of an access violation. + */ +typedef enum { + npfec_kind_unknown, /* must be first */ + npfec_kind_in_gpt, /* violation in guest page table */ + npfec_kind_with_gla /* violation with guest linear address */ +} npfec_kind_t; + +/* + * Nested page fault exception codes. + */ +struct npfec { + unsigned int read_access:1; + unsigned int write_access:1; + unsigned int insn_fetch:1; + unsigned int gla_valid:1; + unsigned int kind:2; /* npfec_kind_t */ +}; + /* memflags: */ #define _MEMF_no_refcount 0 #define MEMF_no_refcount (1U<<_MEMF_no_refcount)